package com.yanfan.community.building.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.yanfan.common.annotation.Excel;
import com.yanfan.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 建筑对象 community_building
 *
 * @author li
 * @date 2025-07-03
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class CommunityBuilding extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 建筑id
     */
    private Long buildingId;

    /**
     * 上级建筑id
     */
    @Excel(name = "上级建筑id")
    private Long parentId;

    private String parentName;

    /**
     * 类型
     */
    @Excel(name = "类型")
    private Integer type;

    /**
     * 祖级列表
     */
    @Excel(name = "祖级列表")
    private String ancestors;

    /**
     * 建筑名称
     */
    @Excel(name = "建筑名称")
    private String buildingName;

    /**
     * 显示顺序
     */
    @Excel(name = "显示顺序")
    private Integer orderNum;

    /**
     * 楼栋面积
     */
    @Excel(name = "楼栋面积")
    private String area;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String leader;

    /**
     * 联系电话
     */
    @Excel(name = "联系电话")
    private String phone;

    /**
     * 邮箱
     */
    @Excel(name = "邮箱")
    private String email;

    /**
     * 建筑类型
     */
    @Excel(name = "建筑类型")
    private Integer buildingType;

    /**
     * 建筑状态（0正常 1停用）
     */
    @Excel(name = "建筑状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 子列表
     */
    @ApiModelProperty("子列表")
    private List<CommunityBuilding> children = new ArrayList<CommunityBuilding>();


    @TableField(exist = false)
    private String value;
    @TableField(exist = false)
    private Boolean showChild =  false;

}
